package cn.raven.feign;

import cn.raven.entity.Store;
import cn.raven.util.AjaxResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class StoreFallback implements FallbackFactory<StoreFeignClient> {
    @Override
    public StoreFeignClient create(Throwable throwable) {
        return new StoreFeignClient() {
            @Override
            public AjaxResult add(Store store) {
                return AjaxResult.me().setSuccess(false).setMessage("GGBO");
            }
        };
    }
}
